# -*- coding = utf-8 -*-
# @Time : 2021/7/15 17:06
# @Author : 龙王赘婿_彪少
# @File : testXwlt.py
# @Software: PyCharm

import xlwt
'''
#创建workbook对象
workbook = xlwt.Workbook(encoding="utf-8")
#创建表单
worksheet = workbook.add_sheet('sheet1')
worksheet.write(0, 0, "hello")
workbook.save('student.xls')
'''

#创建workbook对象
workbook = xlwt.Workbook(encoding="utf-8")
#创建表单
worksheet = workbook.add_sheet('sheet1')

for i in range(0, 9):
    for j in range(0, i + 1):
        worksheet.write(i, j, "%d * %d = %d" % (i + 1, j + 1, (i + 1) * (j + 1)))

workbook.save('student.xls')